﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
//using System.Threading.Tasks;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Data.SQLite;
using Urd.Packet;

namespace Urd.Common
{
    public class manager:IDisposable
    {
        System.Globalization.CultureInfo customCulture;

        protected string tableshema, shemasfolder, tablesfolder;
        protected string managername, dbtablename,dbfilename;
        public string Name { get { return managername; } }
        public string Table { get { return dbtablename; } }

        protected IPAddress address;
        public string Address { get { return address.ToString(); } }

        protected int port;
        public string Port { get { return port.ToString(); } }

        protected Opcode opcode_to_accept;
        public string Code { get { return opcode_to_accept.ToString(); } }

        protected int pps;
        public string PacketPerSecond { get { return pps.ToString(); ; } }

        
        protected List<string> columnnames;
        protected worker.Process process;
        protected TcpListener listener;
        protected bool working, listen;
        public bool Working { get { return working; } }
        protected Thread /*worker,*/ netthread;
        protected System.Threading.Timer timer, timer2;

        protected cache sqlcache;
        public cache Cache { get { return sqlcache; } }

        public void Dispose() 
        {
            sqlcache.Dispose();
        }
    }
}
